package com.yanfan.modbus.frame;


import com.yanfan.modbus.code.FunctionCode;
import com.yanfan.modbus.exception.ModbusTransportException;
import com.yanfan.modbus.frame.abs.ReadResponse;

public class ReadCoilsResponse extends ReadResponse {
    public ReadCoilsResponse(int slaveId, byte[] data) throws ModbusTransportException {
        super(slaveId, data);
    }

    public ReadCoilsResponse(int slaveId) throws ModbusTransportException {
        super(slaveId);
    }


    @Override
    public byte getFunctionCode() {
        return FunctionCode.READ_COILS;
    }


    @Override
    public String toString() {
        return "ReadCoilsResponse [exceptionCode=" + exceptionCode + ", slaveId=" + slaveId + ", getFunctionCode()=" + getFunctionCode() + ", isException()=" + isException() + ", getExceptionMessage()=" + getExceptionMessage() + ", getExceptionCode()=" + getExceptionCode() + ", toString()=" + super.toString(false) + "]";
    }
}
